// import request from '@/utils/request'
import axios from 'axios';

// 部门列表
function getList(params) {
  return axios({
    url: `/system/dept/list`,
    method: 'post',
    data: params,
  });
}

// 部门
function getInfo(id) {
  return axios({
    url: `/system/dept/${id}`,
    method: 'get',
  });
}

// 新增部门
function create(params) {
  return axios({
    url: `/system/dept/create`,
    method: 'post',
    data: params,
  });
}

// 更新部门
function update(params) {
  return axios({
    url: `/system/dept/update`,
    method: 'post',
    data: params,
  });
}

// 删除
function del(id) {
  return axios({
    url: `/system/dept/${id}`,
    method: 'delete',
  });
}


export default {
  getList,
  getInfo,
  create,
  update,
  del
}
